@echo "start build libevent"
set VS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
set OUT=E:\code\libevent\out\vs2019_32\libevent
call %VS%
E:
cd E:\code\libevent\libevent-2.1.12-stable
nmake /f Makefile.nmake clean
nmake /f Makefile.nmake OPENSSL_DIR=E:\code\libevent\out\vs2019_32\openssl

md %OUT%\lib 
md %OUT%\bin
md %OUT%\include 
copy /Y *.lib %OUT%\lib
xcopy /S/Y include %OUT%\include
xcopy /S/Y WIN32-Code\nmake %OUT%\include
copy /Y *.dll %OUT%\bin
copy /Y *.exe %OUT%\bin
@echo "build libevent end"
pause